﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using My_TV_Manager.Model;
using My_TV_Manager.View.ContentPanel;

namespace My_TV_Manager.View
{
    [System.ComponentModel.DesignerCategory("")]

    public class ApplicationInterface : Form
    {
        #region Private Data

        private IContainer components = null;
        private OuterTabbedContainer outerTabbedContainer;
        private ColorScheme colorScheme;
        private Controller controller;

        #endregion

        #region Properties

        public ColorScheme ColorScheme
        {
            get { return colorScheme; }
            set { colorScheme = value; }
        }

        #endregion

        #region Constructors

        // Constructor using controller for program data
        public ApplicationInterface(Controller controller)
        {
            InitializeComponent();

            // Format the window
            this.Text = "My TV Manager 0.1";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.WindowState = FormWindowState.Normal;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.Size = new Size(1280, 720);
            this.colorScheme = Settings.Colors;
            this.controller = controller;

            outerTabbedContainer = new OuterTabbedContainer(this.ClientSize,
                                                            this.colorScheme,
                                                            controller);

            this.Controls.Add(outerTabbedContainer);
        }

        #endregion

        #region Form Implementation Functions

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Text = "UserInterface";
        }

        #endregion
    }
}